<template>
    <div class="right-content">
        <el-tabs v-model="activeName" type="border-card">
            <el-tab-pane label="我的申请" name="nowapply">
              <now-apply></now-apply>
            </el-tab-pane>
            <el-tab-pane label="历史申请" name="pastapply">
              <past-apply></past-apply>
            </el-tab-pane>
            <el-tab-pane label="待我审批" name="waitapply">
              <wait-apply></wait-apply>
            </el-tab-pane>
            <el-tab-pane label="抄送我的 " name="endapply">
              <end-apply></end-apply>
            </el-tab-pane>
        </el-tabs>
    </div>
</template>

<script>
import NowApply from './NowApply.vue'
import PastApply from './PastApply.vue'
import WaitApply from './WaitApply.vue'
import EndApply from './EndApply.vue'
export default {
  name: 'Applys',
  data() {
    return {
      activeName: 'nowapply'
    }
  },
  components: {
    NowApply,
    PastApply,
    WaitApply,
    EndApply
  },
  methods: {
    // 选项卡切换
    handleClick(tab, event) {
      console.log(tab, event)
      if (tab.name === 'nowapply') {
        this.getDataList()
      } else
      if (tab.name === 'pastapply') {
        this.getDataListHistory()
      } else if (tab.name === 'waitapply') {
        this.getDataList2()
      } else if (tab.name === 'endapply') {
        this.getDataList3()
      }
    }
  }
}
</script>

<style scoped>
</style>

